package game.net.server;

import game.event.Event;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.List;

public class ClientConnection {
	Socket conn;
	int lastSentEvent = -1;

	public ClientConnection(Socket accept) {
		conn = accept;
	}

	public void send(List<Event<?>> eventsSince) {
		try {
			ObjectOutputStream oos = new ObjectOutputStream(conn.getOutputStream());
			oos.writeObject(eventsSince);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
